<template>
  <div>
    <el-form
      :inline="true"
      :model="formInline"
      class="demo-form-inline"
    >

      <el-form-item label="区域">
        <el-select
          v-model="formInline.region"
          placeholder="区域"
          @change="ondatachange"
        >
          <el-option
            label="天河区"
            value="shanghai"
          ></el-option>
          <el-option
            label="越秀区"
            value="beijing"
          ></el-option>
          <el-option
            label="荔湾区"
            value="beijing"
          ></el-option>
          <el-option
            label="白云区"
            value="beijing"
          ></el-option>
          <el-option
            label="海珠区"
            value="beijing"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="学校名">
        <el-select
          v-model="formInline.region"
          placeholder="华南师范大学附属中学"
          @change="ondatachange"
        >
          <el-option
            label="广东实验中学"
            value="shanghai"
          ></el-option>
          <el-option
            label="广东广雅中学"
            value="beijing"
          ></el-option>
          <el-option
            label="广州执信中学"
            value="beijing"
          ></el-option>
          <el-option
            label="广州市第二中学"
            value="beijing"
          ></el-option>
          <el-option
            label="广州市第六中学"
            value="beijing"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item label="授课课时统计">
        <el-select
          v-model="formInline.region"
          placeholder="高一"
          @change="ondatachange"
        >
          <el-option
            label="高一"
            value="shanghai"
          ></el-option>
          <el-option
            label="高二"
            value="beijing"
          ></el-option>
          <el-option
            label="高三"
            value="beijing"
          ></el-option>
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button
          style="margin-left:30px;"
          type="primary"
          @click="onSubmit"
        >查询</el-button>
      </el-form-item>
    </el-form>

    <span style="margin-top: 10px;display: block">授课课时统计</span>

    <el-table
      :data="tableData"
      border
      style="width: 100%;margin-top: 10px"
    >
      <el-table-column
        type="index"
        width="50"
      >
      </el-table-column>
      <el-table-column
        prop="district"
        label="年级"
        width="180"
      >
      </el-table-column>

      <el-table-column
        prop="schoolname"
        label="科目"
      >
      </el-table-column>
      <el-table-column
        prop="teachercount"
        label="市平均授课课时"
      >
      </el-table-column>
      <el-table-column
        prop="bestsubject"
        label="本校授课课时"
      >
      </el-table-column>

    </el-table>

    <span style="margin-top: 10px;display: block">年级人数汇总</span>

    <el-table
      :data="tableData2"
      border
      style="width: 100%;margin-top: 10px"
    >
      <el-table-column
        type="index"
        width="50"
      >
      </el-table-column>
      <el-table-column
        prop="district"
        label="年级"
        width="180"
      >
      </el-table-column>

      <el-table-column
        prop="schoolname"
        label="在校人数"
      >
      </el-table-column>
      <el-table-column
        prop="teachercount"
        label="市平均年级人数"
      >
      </el-table-column>
      <el-table-column
        prop="bestsubject"
        label="本校授课课时"
      >
      </el-table-column>

    </el-table>

    <span style="margin-top: 10px;display: block">排课情况综合分析</span>

    <el-table
      :data="tableData3"
      border
      style="width: 100%;margin-top: 10px"
    >
      <el-table-column
        type="index"
        width="50"
      >
      </el-table-column>
      <el-table-column
        prop="district"
        label="年级"
        width="180"
      >
      </el-table-column>

      <el-table-column
        prop="schoolname"
        label="科目"
      >
      </el-table-column>
      <el-table-column
        prop="teachercount"
        label="市总排课数量"
      >
      </el-table-column>
      <el-table-column
        prop="bestsubject"
        label="本校排课数量"
      >
      </el-table-column>

    </el-table>

    <span style="margin-top: 10px;display: block">排课情况分析</span>

    <el-table
      :data="tableData4"
      border
      style="width: 100%;margin-top: 10px"
    >
      <el-table-column
        type="index"
        width="50"
      >
      </el-table-column>
      <el-table-column
        prop="district"
        label=""
        width="180"
      >
      </el-table-column>

      <el-table-column
        prop="schoolname"
        label="科目"
      >
      </el-table-column>
      <el-table-column
        prop="teachercount"
        label="市总数量"
      >
      </el-table-column>
      <el-table-column
        prop="bestsubject"
        label="市平均数量"
      >
      </el-table-column>

    </el-table>
  </div>
</template>

    <script>
export default {
  data () {
    return {
      formInline: {
        user: '',
        region: ''
      },
      tableData: [{
                    district: '高一',
                    schoolname: '语文',
                    teachercount: '6',
                    bestsubject: '6'
                  }, {
                    district: '高一',
                    schoolname: '数学',
                    teachercount: '6',
                    bestsubject: '6'
                  }, {
                    district: '高一',
                    schoolname: '英语',
                    teachercount: '6',
                    bestsubject: '6'
                  }, {
                    district: '高一',
                    schoolname: '物理',
                    teachercount: '4',
                    bestsubject: '4'
                  },
                  {
                    district: '高一',
                    schoolname: '化学',
                    teachercount: '4',
                    bestsubject: '4'
                  }, {
                    district: '高一',
                    schoolname: '生物',
                    teachercount: '4',
                    bestsubject: '4'
                  }, {
                    district: '高一',
                    schoolname: '历史',
                    teachercount: '4',
                    bestsubject: '4'
                  }, {
                    district: '高一',
                    schoolname: '政治',
                    teachercount: '4',
                    bestsubject: '4'
                  }, {
                    district: '高一',
                    schoolname: '地理',
                    teachercount: '4',
                    bestsubject: '4'
                  }],
      tableData2: [{
        district: '高一',
        schoolname: '2147',
        teachercount: '1952',
        bestsubject: '21876'
      }],
      tableData3: [{
                     district: '高一',
                     schoolname: '语文',
                     teachercount: '60000',
                     bestsubject: '72'
                   }, {
                     district: '高一',
                     schoolname: '数学',
                     teachercount: '60000',
                     bestsubject: '72'
                   }, {
                     district: '高一',
                     schoolname: '英语',
                     teachercount: '60000',
                     bestsubject: '72'
                   }, {
                     district: '高一',
                     schoolname: '物理',
                     teachercount: '32000',
                     bestsubject: '28'
                   },
                   {
                     district: '高一',
                     schoolname: '化学',
                     teachercount: '28000',
                     bestsubject: '28'
                   }, {
                     district: '高一',
                     schoolname: '生物',
                     teachercount: '36000',
                     bestsubject: '32'
                   }, {
                     district: '高一',
                     schoolname: '历史',
                     teachercount: '28000',
                     bestsubject: '35'
                   }, {
                     district: '高一',
                     schoolname: '政治',
                     teachercount: '32000',
                     bestsubject: '35'
                   }, {
                     district: '高一',
                     schoolname: '地理',
                     teachercount: '36000',
                     bestsubject: '24'
                   }],
      tableData4: [{
        district: '行政班数量',
        schoolname: '12',
        teachercount: '1500',
        bestsubject: '11'
      }, { district: '教学班数量',
           schoolname: '14',
           teachercount: '16800',
           bestsubject: '11'
      }, { district: '走班人数',
           schoolname: '430',
           teachercount: '48000',
           bestsubject: '390'
      }, { district: '走班频次',
           schoolname: '20%',
           teachercount: '-',
           bestsubject: '24%'
      }]
    }
  },
  methods: {
    handle_detail () {
      this.$router.push('/subject_analysis/subject_change_detail')
    },
    onSubmit () {

    },
    ondatachange () {
      this.tableData = [{
                          district: '华南师范大学附属中学',
                          schoolname: '13',
                          teachercount: '284',
                          bestsubject: '13'
                        }, {
                          district: '广东实验中学附属天河学校',
                          schoolname: '9',
                          teachercount: '310',
                          bestsubject: '14'
                        }, {
                          district: '广州市天河外国语学校',
                          schoolname: '15',
                          teachercount: '238',
                          bestsubject: '16'
                        }, {
                          district: '广州市第47中学',
                          schoolname: '6',
                          teachercount: '173',
                          bestsubject: '13.1'
                        },
                        {
                          district: '广州市天荣中学',
                          schoolname: '11',
                          teachercount: '186',
                          bestsubject: '13.4'
                        }, {
                          district: '广州市华美英语实验学校',
                          schoolname: '15',
                          teachercount: '262',
                          bestsubject: '16.7'
                        }, {
                          district: '广州市天秀中学',
                          schoolname: '16',
                          teachercount: '135',
                          bestsubject: '12.9'
                        }, {
                          district: '广州市恒福中学高中部',
                          schoolname: '9',
                          teachercount: '157',
                          bestsubject: '15.7'
                        }, {
                          district: '华南理工大学附属中学',
                          schoolname: '6',
                          teachercount: '121',
                          bestsubject: '14.9'
                        }]
    }
  }
}

  </script>

  <style
    rel="stylesheet/scss"
    lang="scss"
    scoped
  >
  </style>

